<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>在线用户管理</title>
    <link rel="stylesheet" href="http://static-online.zhaogangtest.com/publicresource/css/bootstrap-table.css">
    <link rel="stylesheet" href="../../../resources/public/css/bootstrap-table-fixed-columns.css">
    <link rel="stylesheet" href="http://static-online.zhaogangtest.com/publicresource/control/daterangpicker/daterangepicker-bs3.css">
    <link rel="stylesheet" href="../../../resources/public/css/table.css">
    <link rel="stylesheet" href="../../../resources/public/css/iconfont.min.css">
    <link rel="stylesheet" href="../../../resources/public/css/scmstrap.css">
</head>

<body>
    <div class="main">
        <!-- 条件区域 -->
        <div class="form-list">
            <div class="group">
                <label>用户名称</label>
                <div class="scm-input-wrap">
                    <input type="text" class="scm-input">
                </div>
            </div>
        </div>
        <!-- 按钮 -->
        <div class="operation">
            <div class="conditionbtn">
                <button class="scm-btn blue">
                    <i class="anticon icon-search1"></i>查询</button>
                <button class="scm-btn">
                    <i class="anticon icon-retweet"></i>重置</button>
            </div>
            <div class="scm-btn-group fr">
                <button class="scm-btn btn-edit-item">
                    <i class="anticon icon-edit1"></i>修改
                </button>
                <button class="scm-btn btn-reset-password">
                    <i class="anticon icon-retweet"></i>重置密码
                </button>
                <button class="scm-btn btn-deny-audit">
                    <i class="anticon icon-delete"></i>作废
                </button>
            </div>
        </div>
        <div class="box-table">
            <table class="table table-condensed" id="table-parent"></table>
        </div>
    </div>
    <!-- 修改 -->
    <div class="layer-edit-item" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <div class="group group-double-column-style">
                    <label>单位名称</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="宁波新柳钢铁贸易有限公司">
                    </div>
                </div>
                <div class="group group-double-column-style">
                    <label>用户名称</label>
                    <div class="scm-input-wrap">
                        <input type="text" class="scm-input" value="曾女士">
                    </div>
                </div>
                <div class="group group-double-column-style">
                    <label>单位电话</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read">
                    </div>
                </div>
                <div class="group group-double-column-style">
                    <label>指定联系人</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="曾女士">
                    </div>
                </div>
                <div class="group group-double-column-style">
                    <label style="width: 95px">指定联系人电话</label>
                    <div class="scm-input-wrap" style="width: calc(100% - 100px);">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="1366666666">
                    </div>
                </div>
                <div class="group group-double-column-style">
                    <label>账号</label>
                    <div class="scm-input-wrap">
                        <input type="text" disabled="disabled" class="scm-input scm-input-read" value="1366666666">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 重置密码 -->
    <div class="layer-reset-password" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <p class="layer-tips"><i class="anticon icon-exclamationcircle fs17 brown"></i>请确认是否重置选中记录密码</p>
            </div>
        </div>
    </div>
    <!-- 作废 -->
    <div class="layer-deny-audit" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <p class="layer-tips"><i class="anticon icon-exclamationcircle fs17 brown"></i>请确认是否取消审核选中记录</p>
            </div>
        </div>
    </div>
    <!-- 审核不通过理由 -->
    <div class="layer-denyaudit-reason" style="display: none;">
        <div class="main">
            <!-- 条件区域 -->
            <div class="form-list form-list-btn-inner nofloat">
                <div class="group group-double-column-style double-column-input-style">
                    <label><b class="must">*</b>取消原因</label>
                    <div class="scm-input-wrap">
                        <textarea type="text" class="scm-input" value="宁波新柳钢铁贸易有限公司"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="http://static-online.zhaogangtest.com/publicresource/js/require.js"></script>
    <script>
    var page;

    require.config({
        paths: {
            "jquery": "../../../resources/public/js/jquery.min",
            "bootstrap": 'http://static-online.zhaogangtest.com/publicresource/js/bootstrap.min',
            // "bootstrap-table": "http://static-online.zhaogangtest.com/publicresource/js/bootstrap-table",
            "bootstrap-table": "../../../resources/public/js/bootstrap-table",
            "moment": "http://static-online.zhaogangtest.com/publicresource/control/daterangpicker/moment.min",
            "daterangepicker": "../../../resources/public/js/daterangepicker",

            "layer": 'http://static-online.zhaogangtest.com/publicresource/control/layer/layer.min',
            "public": "../../../resources/public/js/public",
            "chinese": "../../../resources/public/js/chinese",
            "bootstrap-table-fixed": "../../../resources/public/js/bootstrap-table-fixed-columns",
            "autocomplete": "../../../resources/public/js/jquery.autocomplete",
        },
        shim: {
            "jquery": {
                exports: ['jQuery', '$']
            },
            "bootstrap": {
                deps: ["jquery"]
            },
            "bootstrap-table": {
                deps: ["jquery", "bootstrap"]
            },
            "bootstrap-table-fixed": {
                deps: ["bootstrap-table"]
            },
            "layer": {
                deps: ["jquery"],
                exports: "layer"
            },
            "autocomplete": {
                deps: ['jquery']
            },
            "moment": {
                deps: ['jquery']
            },
            "daterangepicker": {
                deps: ["jquery", "moment"],
                exports: "daterangepicker"
            },
            "chinese": {
                deps: ["jquery", "bootstrap-table"],
            },

            "public": {
                deps: ["jquery", "bootstrap-table", "moment", "daterangepicker"]
            }
        }
    });
    require(["autocomplete", "public", "layer", "chinese", "bootstrap-table-fixed"], function() {
        layer.config({
            path: 'http://static-online.zhaogangtest.com/publicresource/control/layer/'
        });
        $(function() {
            page = {
                init: function() {
                    this.bootstrapTable();
                    this.autocomplete();
                    this.fn_layer();

                    var that = this;
                    $(window).resize(function() {
                        $('#table-parent').bootstrapTable('resetView', {
                            height: that.getHeight()
                        });
                        $('.daterangepicker').hide()
                    });
                    $.daterangepicker("#datepicker", {
                        singleDatePicker: true,
                    });
                    $.daterangepicker("#datepicker2", {
                        singleDatePicker: true,
                    });

                },
                bootstrapTable: function() {
                    $('#table-parent').bootstrapTable({
                        pagination: true, //在表格底部显示分页工具栏
                        pageSize: 50,
                        pageNumber: 1,
                        pageList: [10, 25, 50, 100],
                        height: page.getHeight(),
                        showFooter: true,
                        showColumns: false,
                        showRefresh: false,
                        //                    showToggle:true,
                        search: false,
                        //                    showPaginationSwitch:true,
                        // detailView: true,
                        // detailFormatter: page.showdetail,
                        // detailFormatter: this.showChild,
                        // onExpandRow: this.expandRow,
                        // onCollapseRow: this.collapseRow,
                        locales: 'zh-CN',
                        fixedColumns: false,
                        fixedNumber: 1,
                        url: '../data/erp/tablelist-notice-manage.json',
                        sidePagination: "server", //分页方式：client客户端分页，server服务端分页（*）

                        columns: [{
                            "field": "n1",
                            "title": "标题",
                        }, {
                            "field": "n2",
                            "title": "内容",
                        }, {
                            "field": "n3",
                            "title": "生效开始时间",
                        }, {
                            "field": "n4",
                            "title": "生效结束时间",
                        }]
                    });
                },

                fn_layer: function() {
                    //添加
                    $(document).on('click', '.btn-edit-item', function() {
                        layer.open({
                            type: 1, //page层
                            area: ['800px', 'auto'],
                            title: '公告信息',
                            shadeClose: false,
                            btn: ['确定', '取消'],
                            shade: 0.01, //遮罩透明度
                            moveType: 1, //拖拽风格，0是默认，1是传统拖动
                            shift: -1, //0-6的动画形式，-1不开启
                            content: $('.layer-edit-item'),
                            skin: "skin-searchMore skin-overflow",
                            yes: function() {}
                        });
                    })
                    //查看
                    $(document).on('click', '.btn-reset-password', function() {
                        layer.open({
                            type: 1, //page层
                            area: ['400px', 'auto'],
                            title: '提示',
                            shadeClose: false,
                            btn: ['确定', '取消'],
                            shade: 0.01, //遮罩透明度
                            moveType: 1, //拖拽风格，0是默认，1是传统拖动
                            shift: -1, //0-6的动画形式，-1不开启
                            content: $('.layer-reset-password'),
                            skin: "skin-searchMore skin-overflow",
                            yes: function() {}
                        });
                    })
                    //废弃
                    $(document).on('click', '.btn-deny-audit', function() {
                        layer.open({
                            type: 1, //page层
                            area: ['400px', 'auto'],
                            title: '提示',
                            shadeClose: false,
                            btn: ['确定', '取消'],
                            shade: 0.01, //遮罩透明度
                            moveType: 1, //拖拽风格，0是默认，1是传统拖动
                            shift: -1, //0-6的动画形式，-1不开启
                            content: $('.layer-deny-audit'),
                            skin: "skin-searchMore skin-overflow",
                            yes: function() {
                                layer.open({
                                    type: 1, //page层
                                    area: ['600px', '250px'],
                                    title: '审核不通过',
                                    shadeClose: false,
                                    btn: ['确定', '取消'],
                                    shade: 0.01, //遮罩透明度
                                    moveType: 1, //拖拽风格，0是默认，1是传统拖动
                                    shift: -1, //0-6的动画形式，-1不开启
                                    content: $('.layer-denyaudit-reason'),
                                    skin: "skin-searchMore skin-overflow",
                                    yes: function() {
                                    }
                                });
                            }
                        });
                    })
                },


                autocomplete: function() {
                    var data = ['上海钢找塑料', '上海钢富信息科技有限技有限公司', '上海找油网信息科技', '上海长城实业有限公司',
                        '上海找油网信息科技', '上海长城实业有限公司'
                    ]
                    $("#company input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company1 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap1',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company2 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap2',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company3 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap3',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company4 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap4',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                    $("#company5 input").autocomplete({
                        lookup: data,
                        minChars: 0,
                        appendTo: '#companywrap5',
                        onSelect: function(suggestion) {
                            // $(this).val(suggestion.value);
                        },
                    });
                },
                // 表格高度
                getHeight: function() {
                    var _height = $('.form-list').outerHeight(
                        true) + $('.operation').outerHeight(true)
                    return $(window).height() - _height - 20;
                },
            }
            page.init();
        })
    })
    </script>
</body>

</html>